﻿@inherits BaseComponent
@if ( !HasCustomRegistration )
{
    @if ( Link != null )
    {
        <a href="@Link" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
            @ChildContent
            @if ( Closable )
            {
                <span class="@CloseClassBuilder.Class" aria-label="Close" @onclick="@OnCloseClickedHandler" @onclick:preventDefault="true">
                    <span aria-hidden="true">&times;</span>
                </span>
            }
        </a>
    }
    else
    {
        <span class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
            @ChildContent
            @if ( Closable )
            {
                <span class="@CloseClassBuilder.Class" aria-label="Close" @onclick="@OnCloseClickedHandler">
                    <span aria-hidden="true">&times;</span>
                </span>
            }
        </span>
    }
}
else
{
    @RenderCustomComponent()
}
